package com.sihan.swvp.dao.sys;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.sihan.swvp.dao.BaseDao;

public interface PrivEnterpriseDao extends BaseDao{

	//	public List<Map<String, Object>> getEnterprise(@Param("cd")String cd);
	//
	//	public int addEnterprise(Enterprise enterprise);
	//
	//	public int upateEnterprise(Enterprise enterprise);
	//
	//	public void deleteEnterprise(@Param("id")String id);
	
	@Select("select * from priv_enterprise where e = #{e}")
	public List<Map<String, Object>> getPri(@Param("e")int e);

	@Insert("insert into priv_enterprise(e,prive) values(#{e},#{prie})")
	public void addPri(@Param("e")int e,@Param("prie")int prie);

//	@Delete("delete from priv_enterprise where e=#{e} and prive=#{prie}")
//	public void deletePri(@Param("e")int e,@Param("prie")int prie);

	public List<Map<String, Object>> getEnterprise(@Param("eid")Integer eid,@Param("userid")Long userid);

	public void deletePriByE(@Param("e")int e);

//	public void addPriv(Map<String, Object> params);

	public void addPrivs(@Param("e")int e, @Param("prives")String[] idsarray);
}
